package com.hoshiicloud.user.service.store;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.aop.Logable;
import com.hoshiicloud.rbac.entity.SysUsers;
import com.hoshiicloud.rbac.vo.SysUsersVO;
import com.hoshiicloud.user.entity.store.StoreDepartment;
import com.hoshiicloud.user.entity.store.StoreUsers;
import com.hoshiicloud.user.param.rbac.SysUsersQueryParam;
import com.hoshiicloud.user.param.store.StoreUsersQueryParam;
import com.hoshiicloud.user.vo.store.StoreUsersVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 平台员工 服务类
 * </p>
 *
 * @author campchen
 * @since 2019-07-24
 */
public interface StoreUsersService extends IService<StoreUsers> {
    IPage getPage(IPage page, QueryWrapper queryWrapper);

    StoreUsers getById(Long id);

    List<StoreUsers> getByIds(List<Long> ids, String key);
    @Override
    boolean save(StoreUsers param);
    @Override
    boolean updateById(StoreUsers param);

    boolean deleteStoreUsersById(Long id);

    public boolean forbidStoreUsersById(Long id);

    public boolean notForbidStoreUsersById(Long id);

    /**
     * 批量删除或禁用数据 flag=1 删除,flag=2 禁用
     * @param idsArr
     * @param flag
     * @return
     */
    public boolean batchDeleteStoreUsers(List<Long> idsArr,int flag);

    public IPage<StoreUsersVO> storeUserPageList(IPage<StoreUsersVO> page, StoreUsersQueryParam param);

    /**
     * 店铺管理根据角色名称分页查询员工列表
     * @param page
     * @param param
     * @return
     */
    IPage<StoreUsersVO> getStoreUserByRoleName(IPage<StoreUsersVO> page, @Param("param") StoreUsersQueryParam param);

    /**
     * 根据查询条件获取员工姓名列表
     * @param param
     * @return
     */

    public List<Map> storeUserNameList(StoreUsersQueryParam param);


}
